3 Building in Mac OS X can be accomplished in just a few steps:
5 * Install general development tools (clang, make, git)
6 * Install ARM GCC 4.9 series compiler
7 * Checkout u360gts sourcecode through git
10 ## Install general development tools (clang, make, git)
12 Open up a terminal and run `make`. If it is installed already, you should see a message like this, which means that you
13 already have the required development tools installed:
16 make: *** No targets specified and no makefile found. Stop.
19 If it isn't installed yet, you might get a popup like this. If so, click the "install" button to install the commandline
22 ![Prompt to install developer tools](assets/mac-prompt-tools-install.png)
24 If you just get an error like this instead of a helpful popup prompt:
27 -bash: make: command not found
30 Try running `xcode-select --install` instead to trigger the popup.
32 If that doesn't work, you'll need to install the XCode development environment [from the App Store][]. After
33 installation, open up XCode and enter its preferences menu. Go to the "downloads" tab and install the
34 "command line tools" package.
36 [from the App Store]: https://itunes.apple.com/us/app/xcode/id497799835
38 ## Install ARM GCC 4.9 series compiler
40 u360gts is built using the 4.9 series GCC compiler provided by the [GNU Tools for ARM Embedded Processors project][].
42 Hit the "all downloads" link on the right side of the GNU Tools for ARM page to view [the older releases][]. Grab the
43 Mac installation tarball for the latest version in the 4.9 series (e.g. 4.9-2015q2). Move it somewhere useful
44 such as a `~/development` folder (in your home directory) and double click it to unpack it. You should end up with a
45 folder called `~/development/gcc-arm-none-eabi-4_9-2015q2/`.
47 Now you just need to add the `bin/` directory from inside the GCC directory to your system's path. Run `nano ~/.profile`. Add a
48 new line at the end of the file which adds the path for the `bin/` folder to your path, like so:
51 export PATH=$PATH:~/development/gcc-arm-none-eabi-4_9-2015q2/bin
54 Press CTRL+X to exit nano, and answer "y" when prompted to save your changes.
56 Now *close this terminal window* and open a new one. Try running:
59 arm-none-eabi-gcc --version
62 You should get output similar to:
65 arm-none-eabi-gcc.exe (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288]
66 Copyright (C) 2014 Free Software Foundation, Inc.
67 This is free software; see the source for copying conditions. There is NO
68 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
71 If `arm-none-eabi-gcc` couldn't be found, go back and check that you entered the correct path in your `~/.profile` file.
73 [GNU Tools for ARM Embedded Processors project]: https://launchpad.net/gcc-arm-embedded
74 [the older releases]: https://launchpad.net/gcc-arm-embedded/+download
76 ## Checkout u360gts sourcecode through git
78 Enter your development directory and clone the [u360gts repository][] using the "HTTPS clone URL" which is shown on
79 the right side of the u360gts GitHub page, like so:
82 git clone https://github.com/u360gts/u360gts.git
85 This will download the entire u360gts repository for you into a new folder called "u360gts".
87 [u360gts repository]: https://github.com/u360gts/u360gts
91 Enter the u360gts directory and run `make TARGET=NAZE` to build firmware for the Naze32. When the build completes,
92 the .hex firmware should be available as `obj/u360gts_NAZE.hex` for you to flash using the u360gts
95 ## Updating to the latest source
97 If you want to erase your local changes and update to the latest version of the u360gts source, enter your
98 u360gts directory and run these commands to first erase your local changes, fetch and merge the latest
99 changes from the repository, then rebuild the firmware:
105 make clean TARGET=NAZE